<!--
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				CompanySearch.jsp
  //	TITLE:				Company Search
  //	FUNCTION:			Search Company by selecting some conditions.
  //	BY:					Jet Tao
  //	DATE:				09/12/2003
  // --------------------------------------------------------------
-->
<%@ include file="../tssheader.jsp" %>
<%@ page import="tss.company.*" %>
<%@ page import="tss.options.*" %>

<%
	//Get A Company Code list
	CompanyOptions CompanyOptions=new CompanyOptions();

	//Get A Company Name list
	CompanyNameOptions CompanyNameOptions=new CompanyNameOptions();

%>
<script language="JavaScript">

/**
 *when you change Company code,change Company Name
*/
function CompanyCodeDoChange()
{
	fm.company_name.value=fm.company_name.options[fm.company_code.selectedIndex].value;
}

/**
 *when you change Company Name,change Company Code
*/
function CompanyNameDoChange()
{
	fm.company_code.value=fm.company_code.options[fm.company_name.selectedIndex].value;
}


</script>

<body>
<h2>Department Maintenance</h2>
<form id=fm method=post action=<%=contextPath%>/servlet/tss.company.CompanySearch >
<table cols=4 >
<tr>
  <td>Department Code:</td>
  <td>
  <select name=company_code onChange='CompanyCodeDoChange()'>        <%=CompanyOptions.getOptions("")%>
  </select>
  </td>
</tr>
<tr>
  <td>Department Name:</td>
  <td>
  <select name=company_name onChange='CompanyNameDoChange()'>        <%=CompanyNameOptions.getOptions("")%>
  </select>
  </td>
</tr>

</table>
<br>
<hr>
<p>
  <INPUT type=button value=New    onclick=javascript:location.href="<%=contextPath%>/tss/company/Company.jsp?formAction=Create" >
  <INPUT type=submit value=Search >
  <INPUT type=reset  value=Cancel >
</p>
</form>
<%@ include file="../tssfooter.jsp" %>
</body>
</html>


